<%@ include file="../layout/taglib.jsp"%>
<div class="content-top">
	<div class="wrap">

		<div class="section group">
			<div class="col span_2_of_contact">
				<div class="contact-form">
					<h3>${test.title}</h3>
					<div>
						<span>${test.description}</span>
					</div>
					<c:if test="${not empty sessionScope.userFLogin and not empty listquest}">
						<div>
							<form action="saveTest" method="POST">
							   <input type="hidden" value="${test.id}" name="idtest"/>
								<ul class="list3">
									<c:forEach items="${listquest}" var="quest">
										 <li>
											<div class="extra-wrap1">
												<p>${quest.questContent}</p>
												
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													      <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 1}">
													           <input type="radio" id="choice${quest.qestId}_1" name="choice${quest.qestId}" aria-label="..." value=1 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_1" name="choice${quest.qestId}" aria-label="..." value=1>
													        </c:otherwise>
													      </c:choose>
													         <label for="answer" class="control-label">${quest.collect1}</label>
													      </span>
													      </div>
													  </div>
													</div>
												
												  <div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 2}">
													           <input type="radio" id="choice${quest.qestId}_2" name="choice${quest.qestId}" aria-label="..." value=2 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_2" name="choice${quest.qestId}" aria-label="..." value=2>
													        </c:otherwise>
													      </c:choose>
													       
													        <label for="answer" class="control-label">${quest.collect2}</label>
													      </span>
													    </div>
													  </div>
													</div>
													
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 3}">
													           <input type="radio" id="choice${quest.qestId}_3" name="choice${quest.qestId}" aria-label="..." value=3 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_3" name="choice${quest.qestId}" aria-label="..." value=3>
													        </c:otherwise>
													      </c:choose>
													        <label for="answer" class="control-label">${quest.collect3}</label>
													      </span>
													    </div>
													  </div>
													</div>
													
													<div class="row">
													  <div class="col-lg-6">
													    <div class="input-group">
													      <span class="input-group-addon">
													        <c:choose>
													        <c:when test="${not empty view_correction and quest.answer eq 4}">
													           <input type="radio" id="choice${quest.qestId}_4" name="choice${quest.qestId}" aria-label="..." value=4 checked>
													        </c:when>
													        <c:otherwise>
													           <input type="radio" id="choice${quest.qestId}_4" name="choice${quest.qestId}" aria-label="..." value=4>
													        </c:otherwise>
													      </c:choose>
													        <label for="answer" class="control-label">${quest.collect4}</label>
													      </span>
													    </div>
													  </div>
													</div>
												
											</div>
										</li>
									</c:forEach>
							     </ul>
							     <div>
									<span><input type="submit" value="<t:message code="send"/>" ></span>
							     </div>
							</form>
						</div>
					</c:if>
				</div>
			</div>
			<div class="col span_1_of_contact">
				<div class="company_address">
					<h3>
						<t:message code="test_information" />
						:
					</h3>
					<p>
					<div class="boxImage">
						<img src="<%=request.getContextPath()%>/photoTestf/${test.id}"
							alt="${test.title}" />
					</div>
					</p>
					<p>
						<t:message code="teacher" />
						: <a href="<%=request.getContextPath()%>/viewUser?id=${test.user.idUser}">  
				   					${test.user.firstName} 
				   		  </a>
					</p>
					<div class="contact-form">
						<form action="do_test" method="POST">
							<input type="hidden" value="${test.id}" name="idTest" />
							<c:if test="${empty sessionScope.userFLogin}">
								<span><input type="submit"
									value="<t:message code="do_test"/>" /></span>
							</c:if>

						</form>
					</div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>